package com.giaothong.controller;

import org.json.JSONObject;

import android.content.Context;

import com.giaothong.http.HttpGetListLocationStatusRequest;
import com.giaothong.http.HttpSendLocationStatusRequest;
import com.giaothong.http.core.HttpAsyncCallback;
import com.google.android.maps.GeoPoint;

public class LocationController {
	/**
	 * get List Location status
	 * 
	 * @param context
	 * @param callback
	 */
	public static void getListLocationStatus(Context context, HttpAsyncCallback<JSONObject> callback) {
		HttpGetListLocationStatusRequest httpGetListLocationStatusRequest = new HttpGetListLocationStatusRequest(context, callback);
		httpGetListLocationStatusRequest.request();
	}

	/**
	 * send location status
	 * 
	 * @param context
	 * @param callback
	 * @param location
	 * @param status
	 * @param userId
	 * @param locationName
	 */
	public static void sendLocationStatus(Context context, HttpAsyncCallback<JSONObject> callback, GeoPoint location, int status, String userId, String locationName, String locationAddress) {
		HttpSendLocationStatusRequest httpSendLocationStatusRequest = new HttpSendLocationStatusRequest(context, callback);
		httpSendLocationStatusRequest.request(location, status, userId, locationName, locationAddress);
	}
}
